package com.sgcc.system.api;

import com.sgcc.common.core.constant.ServiceNameConstants;
import com.sgcc.common.core.domain.R;
import com.sgcc.common.core.web.domain.AjaxResult;
import com.sgcc.common.core.web.page.TableDataInfo;
import com.sgcc.system.api.domain.SysArea;
import com.sgcc.system.api.domain.SysUser;
import com.sgcc.system.api.factory.RemoteAreaFallbackFactory;
import com.sgcc.system.api.factory.RemoteUserFallbackFactory;
import com.sgcc.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户服务
 * 
 * @author sgcc
 */
@FeignClient(contextId = "remoteAreaService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteAreaFallbackFactory.class)
public interface RemoteAreaService
{
    /**
     * 通过用户名查询用户信息
     *
     * @param orgList
     * @return 结果
     */
    @GetMapping(value = "/area/getArealistBycode")
    public List<SysArea> getArealistBycode(List<String> orgList);
    /**
     * 通过用户名查询用户信息
     *
     * @param deptId
     * @return 结果
     */
    @GetMapping(value = "/area/getAreaByDeptId/{deptId}")
    public R<SysArea> getAreaByDeptId(@PathVariable(value="deptId") String deptId);


    @RequestMapping("/area/getAreaBycode")
    public SysArea getAreaBycode(String code);
}
